<style>
    .vip_search input::-webkit-input-placeholder { /* WebKit browsers */
    color: rgba(120,32,31,0.5);
    } 
  
    .vip_search input:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
    color: rgba(120,32,31,0.5);
    } 
  
    .vip_search input::-moz-placeholder { /* Mozilla Firefox 19+ */
    color: rgba(120,32,31,0.5);
    } 
  
    .vip_search input:-ms-input-placeholder { /* Internet Explorer 10+ */
    color: rgba(120,32,31,0.5);
    }
  </style>
  {eq name="controller" value="index"}
  <form id="search" method="get" action="{:url('home/search/index')}">
  {else /}
  <form id="search" method="get" action="{:url('home/'.$controller.'/index')}">
  {/eq}
      <div class="vip_search Fleft">
        <div class="vip_search_con">
          <div class="vip_search_input Fleft">
            {eq name="controller" value="courseware"}
            <input type="hidden" name="cid" value="{$cid|default=2}" />
            {/eq}
            <input type="text" name="kw" id="kw" value="{$kw|default=''}" placeholder="请输入搜索内容"/>
          </div>
          <div class="vip_search_btn Fright" id="search_btn">
            <input type="button" value="搜索" />
          </div>
        </div>
        <div class="vip_search_text">
            热门推荐：
            <a href="{:url('home/'.$controller.'/index')}?kw=针灸疗法">针灸疗法</a>
            <a class="red" href="{:url('home/'.$controller.'/index')}?kw=滇黄芩">滇黄芩</a>
        </div>
      </div>
      <div class="vip_serch_font Fleft"><a href="{:url('home/search/pre')}">高级搜索</a></div>
      
      <script>
        $('#search_btn').click(function(){
          var kw = $('#kw').val();
          // console.log(kw);return false;
          if(!kw){
            alert('请输入搜索内容');
            return false;
          }
          $("#search").submit();
        })
      </script>
  </form>